package com.xxl.rpc.sample.server.conf;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * xxl-rpc provider config
 *
 * @author xuxueli 2018-10-19
 */
@Configuration
public class XxlRpcProviderConfig {

	/**
	 * 启动注册,停止关闭
	 * 
	 * @param schedulerFactory
	 * @return
	 */
	@Bean(initMethod = "start", destroyMethod = "destroy")
	public XxlJobDynamicScheduler getXxlJobDynamicScheduler() {

		XxlJobDynamicScheduler xxlJobDynamicScheduler = new XxlJobDynamicScheduler();
		return xxlJobDynamicScheduler;
	}

}
